Repository navigation
Conversation
DECISION: Expose a protected view-building hook and share the vector DXF builder. WHY (2026-11-18 drawing integration): The requested contribution should add a complete drawing workflow to SimpleCADAPI while using the same solver and entity writers. A duplicated planner and DXF renderer would diverge. WHAT CHANGES: Direct SheetPlan rendering still uses the existing projection and PNG path. The workflow can supply cached geometry and generate the saved vectors separately. Checked: Native drawing and workflow tests passed in the integrated checkout with the unchanged release C++ extension. Co-Authored-By: OpenAI Codex <[email protected]>
DECISION: Integrate dxf-exporter as an optional workflow in the existing sca CLI. WHY (2026-11-18 drawing integration): The user wants to produce and review drawings without assembling a full declaration for each part, and to carry design parameters into measured drawing annotations. ALTERNATIVE CONSIDERED AND REJECTED: A standalone CLI and independent solver would duplicate package setup and nominal measurements. WHAT CHANGES: Add automated planning, declared replay, inspection overlays, bounded previews and audited notebook parameter bindings. Polygonal review projection uses the existing verify extra. Checked: Checkout-based tests, 7 paired example exports, and 4 native same-declaration controls. The Windows skill-path TOML test also fails against the original wheel and is outside this series. Co-Authored-By: OpenAI Codex <[email protected]>
…ok replay DECISION: Keep the example and verification sources reviewable in Git. WHY (2026-11-18 drawing integration): Maintainers need a reproducible example that distinguishes workflow automation from geometry measured by the existing SDK and checks the extended paths. See design-docs/optional-drawing-workflow.md. WHAT CHANGES: Add an editable part notebook, command examples, and tests for native dimensions, physical-solid extents, bounded A0 output, declared views, overlays and rejected parameter mismatches. Checked: 111 selected upstream and new tests passed. One original Windows skill-path TOML test was reproduced against the release wheel and excluded from that result. Co-Authored-By: OpenAI Codex <[email protected]>
DECISION: Include the two small drawing example files in the existing sdist allowlist. WHY (2026-11-18 drawing integration): The linked notebook is the reproducible design-intent example, and the default sdist filter excludes this folder. Checked: uv build --sdist succeeded. The archive contains the drawing CLI, template JSON, README and notebook and excludes the local native extension. Co-Authored-By: OpenAI Codex <[email protected]>
…icit units DECISION: Keep unitless Vars as non-length parameters until a drawing binding declares a unit. WHY (2026-11-18 official notebook comparison): The flange, bracket and constrained-sketch notebooks could not finish because the drawing workflow assumed every Var had a Unit. Counts and ratios are legitimate notebook inputs; the sketch also uses legacy unitless lengths. WHAT CHANGES: List dimensionless parameters without inventing lengths and accept explicit units on selected dimensionless values. Keep canonical millimetres in the ledger after a binding resolves. Checked: Six original upstream notebooks, 24 drawing runs and 22 parameter measurements; 112 selected upstream and drawing tests passed. Co-Authored-By: OpenAI Codex <[email protected]>
…rated render_plan doc PROBLEM CI failed on all Python versions with three repository rules: Chinese text under src/ (drawing_templates.json labels and review notes), a skill reference to ../../examples/dxf_exporter/README.md outside the skill tree, and docs/.../render_plan.md not regenerated after render.py changed. DECISION Translate the template labels and review notes (same keys, options and sources), link the example folder (directory links are accepted by the skill lint, like the other example links), and regenerate the API page with tools/auto_docs_gen.py. EVIDENCE test_library_is_english, test_skill_lint, test_skill_build, test_auto_docs_gen pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PROBLEM auto_drawing wrote <out>.drawing.json and <out>.plan.json only after write_engineering_sheet returned. A rendering failure (e.g. a DIM_RENDER_MISMATCH raised by the read-back check) left the reviewer with neither the declaration to fix and replay nor the plan saying what failed. DECISION Catch the rendering error, record it under the plan's "render" entry, write both files, then re-raise so the CLI still reports the error. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PROBLEM With --layout compact a full section replaced the top or right view under the name "section"; notebook design-intent rows naming that view no longer resolved. Reproduced with the PR's own example: `sca drawing --notebook examples/dxf_exporter/stepped_mount.py --layout compact` failed with "LEDGE_THICKNESS: specify a declared view". DECISION The section is that view, cut: it keeps the replaced view's name. Section views are recognised by their "section" entry, never by the name, so nothing else depends on it. EVIDENCE The example now draws (A3, top = full section, 6 dimensions); new test test_compact_layout_section_keeps_the_replaced_view_for_design_intent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ansforms
PROBLEM
- export_sheet required a top-level layout, while the only layout the CLI writes is nested under
"layout" in the inspection metadata, so --layout-json could not take the CLI's own output
("This exporter keeps DXF modelspace at 1:1").
- rigid_shape indexed rotation / translation_mm directly: a transform JSON without one of them
raised KeyError, which the CLI does not catch, so users got a traceback.
DECISION
Unwrap the nested layout as export_view_previews already does; raise ValueError naming the
missing keys (the CLI turns it into its JSON error with exit code 2).
EVIDENCE
Both reproduced through the CLI before the fix; new tests
test_an_inspection_sheet_reuses_the_layout_the_cli_wrote and
test_a_transform_without_translation_is_a_clear_error.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
|
Thanks for this workflow, the plan/audit/replay loop is well thought out. I reviewed the PR, reproduced the findings below through the CLI, and pushed fixes for the blocking ones onto this branch (maintainer edits), together with a merge of current CI (all Python jobs failed on three repository rules), fixed in
Bugs, each reproduced and then fixed with a regression test:
Not blocking; worth a follow-up:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
sca drawing, an optional single-part drawing workflow for STEP files and SimpleCADAPI notebooks. The workflow proposes a primary orientation, orthographic views, a section when supported by the geometry, model-bound dimensions, and a sheet. Agents can inspect the proposed declaration and its audit, edit the declaration, and replay it.This builds on the section views and model-bound
DIMENSIONentities introduced in #95. The workflow reusesSheetPlanand the vector DXF builder. Existing declarative callers can continue to use the same entry point.What reviewers can try
The CLI uses the existing
drawingextra. The optional polygonal hidden-line projection uses theverifyextra. The packaged walkthrough inexamples/dxf_exporter/README.mdcovers the default notebook, parameter overrides, and replay. Its annotated diameter changes from Ø6 H7 to Ø8 H7 and the hole spacing changes from 31 to 36 mm. The workflow checks each bound value against the model and the written DXF.Implementation
simplecadapi.dxf_engine.workflow, with machine-readable issues and metric drafting presets.DRAWING_INTENTand report unresolved bindings. Measure extents on the physical solid when STEP includes presentation geometry.Validation
2.3.0.post1native extension. The selected drawing, CLI, and skill tests produced 111 passes. Three Windows-specific failures reproduced against the unmodified release (line endings, a TOML path fixture, and a zsh fixture). The source distribution built successfully with the example and template data included.The generated sheets support single-part review. Manufacturing requirements, tolerances, and fits come from explicit input. Layout and missing-dimension issues remain visible in the audit.